<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('AdminPage/index')}">留言管理</a></li>

    </ul>
    <!-- 搜索回头再搞吧-->
    <!--<form class="well form-inline margin-top-20" method="post" action="{:url('')}">&nbsp;
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('')}">清空</a>
    </form>-->
    <form class="js-ajax-form" method="post">
        <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('AdminPage/delete')}"
                    data-subcheck="true" data-msg="{:lang('DELETE_CONFIRM_MESSAGE')}">{:lang('DELETE')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="100">ID</th>
                <th>留言信息</th>
                <th width="100">留言人</th>
                <th width="160">留言时间</th>
                <th width="100">ip</th>
                <th width="130">城市</th>
                <th width="120">操作</th>
            </tr>
            </thead>
            <foreach name="message" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}">
                    </td>
                    <td>{$vo.id}</td>
                    <td>
                        {$vo.content}
                    </td>
                    <td>{$vo.name}</td>
                    <td>
                        <empty name="vo.time">
                            无时间信息
                            <else/>
                            {$vo['time']}
                        </empty>
                    </td>
                    <td>
                        <notempty name="vo.ip">
                            {$vo['ip']}
                            <else/>
                            没有获取到ip
                        </notempty>
                    </td>
                    <td>
                        <notempty name="vo.city">
                            {$vo['city']}
                            <else/>
                            没有获取到城市
                        </notempty>
                    </td>
                    <td>
                        <a href="{:url('Message/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            <tfoot>
            <tr>
                <th width="16">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="100">ID</th>
                <th>留言信息</th>
                <th width="80">留言人</th>
                <th width="160">留言时间</th>
                <th width="100">ip</th>
                <th width="120">城市</th>
                <th width="120">操作</th>
            </tr>
            </tfoot>
        </table>
        <div class="table-actions">
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit" data-action="{:url('Message/delete')}"
                    data-subcheck="true" data-msg="你确定删除吗？">{:lang('DELETE')}
            </button>
        </div>

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>